$OpenBSD: patch-inc_My_Build_Any_wx_config_Bakefile_pm,v 1.3 2013/03/21 01:34:47 sthen Exp $
use glob() to find all matching $lib.so.*, and take the last value
--- inc/My/Build/Any_wx_config_Bakefile.pm.orig	Mon Dec 28 19:10:47 2009
+++ inc/My/Build/Any_wx_config_Bakefile.pm	Thu Mar 21 01:30:26 2013
@@ -3,7 +3,6 @@ package My::Build::Any_wx_config_Bakefile;
 use strict;
 our @ISA = qw(My::Build::Any_wx_config::Base);
 use Config;
-
 sub awx_wx_config_data {
     my $self = shift;
     return $self->{awx_data} if $self->{awx_data};
@@ -44,8 +43,13 @@ sub awx_wx_config_data {
         $key = 'core' if $key =~ m/^gtk2?[ud]{0,2}/
                               && $self->awx_is_monolithic
                               && $lib =~ m/(?:gtk2?|mac)[ud]{0,2}-/;
-        my $dll = "lib${name}." . $self->awx_dlext . $libsuffix;
+        my $dll = "lib${name}." . $self->awx_dlext;
 
+	my @t = glob("${LOCALBASE}/lib/$dll.*");
+	if ($#t >= 0) {
+		$dll = $t[-1];
+		$dll =~ s/.*\///g;
+	}
         $data{dlls}{$key} = { dll  => $dll,
                               link => $lib };
     }
